{itemplate 'public/header'}
<style>
	td span{display: inline-block; vertical-align: middle;}
</style>
<form action="./index.php" class="form-horizontal form-filter" >
	{php echo tpl_form_filter_hidden('spread/user/index');}
	<div class="form-group">
		<label class="col-xs-12 col-sm-3 col-md-2 control-label">成为会员时间</label>
		<div class="col-sm-9 col-xs-12">
			{php echo itpl_form_field_daterange('spreadtime', array('placeholder' => '成为会员的时间'));}
		</div>
	</div>
	<div class="form-group form-inline">
		<label class="col-xs-12 col-sm-3 col-md-2 control-label">搜索栏</label>
		<div class="col-sm-3 col-xs-12">
			<input type="text" name="membername" value="{$_GPC['membername']}" class="form-control" placeholder="昵称/姓名/手机号"/>
		</div>
	</div>
	<div class="form-group">
		<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
		<div class="col-sm-3 col-xs-12">
			<button class="btn btn-primary">筛选</button>
		</div>
	</div>
</form>
<form action="" class="form-table">
	<div class="panel panel-table">
		{if empty($members)}
		<div class="no-result">
			<p>还没有相关数据</p>
		</div>
		{else}
		<div class="panel-body table-responsive js-table">
			{if empty($members)}
			<div class="no-result">
				<p>还没有相关数据</p>
			</div>
			{else}
			<table class="table table-hover">
				<thead>
				<tr>
					<th>会员</th>
					<th>直接上线</th>
					<th>间接上线</th>
					<th>上线是否已固定</th>
					<th>注册时间</th>
				</tr>
				</thead>
				{loop $members $member}
				<tr>
					<td>
						<span>
							<img src="{php echo tomedia($member['avatar'])}" alt="" width="50px">
						</span>
						<span>
							{$member['nickname']}
							<br/>
							{$member['realname']}
						</span>
					</td>
					<td>
						{if empty($member['spread1'])}
							{if $member['spreadfixed'] > 0}
								平台直属
							{else}
								暂无推广人
							{/if}
						{else}
							<img src="{php echo tomedia($member['spread1']['avatar'])}" alt="" width="50"/>
							{$member['spread1']['nickname']}
						{/if}
					</td>
					<td>
						{if empty($member['spread2'])}
							{if $member['spreadfixed'] > 0}
								平台直属
							{else}
								暂无推广人
							{/if}
						{else}
							<img src="{php echo tomedia($member['spread2']['avatar'])}" alt="" width="50px"/>
							{$member['spread2']['nickname']}
						{/if}
					</td>
					<td>
						{if $member['spreadfixed'] == 1}
							是
						{else}
							否
						{/if}
					</td>
					<td>
						{php echo date('Y-m-d', $member['addtime'])}
						<br/>
						{php echo date('H:i:s', $member['addtime'])}
					</td>
				</tr>
				{/loop}
			</table>
			{$pager}
			{/if}
		</div>
		{/if}
	</div>
</form>
{itemplate 'public/footer'}